
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Reply.Seat.LeadCollector.BL;
using Reply.Seat.LeadCollector.UI;

namespace Reply.Seat.LeadCollector.iPhone
{
	public partial class SincronizzatiTableViewController : UITableViewController
	{
		#region Private Members
		private DataSource _dataSource;
		#endregion
		
		#region Protected Members
		protected DataSource CurrentDataSource {
			get {
				if (_dataSource == null) {
					_dataSource = new DataSource (SharedObjects.LeadSincronizzati);
					//_dataSource.OnUpdateBadge += Handle_dataSourceOnUpdateBadge;
				}
				return _dataSource;
			}
		}

			
		#endregion
		
		#region Constructors

		// The IntPtr and initWithCoder constructors are required for items that need 
		// to be able to be created from a xib rather than from managed code

		public SincronizzatiTableViewController (IntPtr handle) : base(handle)
		{
			Initialize ();
		}

		[Export("initWithCoder:")]
		public SincronizzatiTableViewController (NSCoder coder) : base(coder)
		{
			Initialize ();
		}

		public SincronizzatiTableViewController () : base("SincronizzatiTableViewController", null)
		{
			Initialize ();
		}

		void Initialize ()
		{
		}
		
		
		
		public override void ViewDidAppear (bool animated)
		{
			base.ViewDidAppear (animated);
			this.TableView.DataSource = CurrentDataSource;
		}
		#endregion
	}
}

